<style>
.fui-block-group {
    border-radius:0.5rem
}
.fui-block-group .fui-block-child {
    background: #fff;
}
.fui-block-group .fui-block-child .icon {height: auto; padding-top: 0.3rem; text-align: center; font-size: 1.3rem;}
.fui-block-group .fui-block-child .icon i { font-size:1.3rem;}
.fui-block-group .fui-block-child .title {
    height: auto;
    font-size: 0.6rem;
    line-height: 1.4
    text-align: center;
    color: #333;
}
</style>
<div class='fui-page fui-page-current'>
    <div class='fui-content'>
	<div ng-if="pagedata.tips" class="tips tips-yellow" style="margin:0">
			<i class="fa fa-bullhorn"></i> {{pagedata.tips}}
	</div>
	<div style="background: #05c175;padding:0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:2.2rem;height:2.2rem" ng-src="{{tomedia(pagedata.store.logo) || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-cellone-text" style="font-size:0.7rem;color:#fff;padding-left:0.5rem">
					<div class="bold">{{pagedata.store.title || '门店名称'}} </div>
					<div style="font-size:0.6rem">{{pagedata.store.goodsnum || 0}}个商品 </div>
				</div>
				<div class="fui-cellone-remark noremark" style="font-size:0.7rem;color:#fff;">
					<a ng-click="pagedata.showstores=true" style="border-radius: 1rem;padding:0.2rem 0.3rem;font-size:0.6rem; background-color: #059b5e;width:auto;color:#fff"><i class="icon icon-qiehuan" style="font-size:0.6rem"></i> 切换门店</a>
				</div>
			</div>	
			<div class="fui-icon-group noborder  col-3" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:12px;color:#fff">门店商品</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.store.goodsnum || '0'}}</div>
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:12px;color:#fff">门店订单</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.store.ordernum || 0}}</div>
														
													</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
													<div>
														<div class="subtitle" style="font-size:12px;color:#fff">门店营收</div>
														<div class="text bold" style="color:#fff;line-height:1.6rem;font-size:1rem">{{pagedata.store.orderfee || 0.00}}</div>
													</div>
					</div>
			</div>			
	</div>
	<div style="padding:0.5rem;margin-top:-2rem">
			<div class="fui-icon-group noborder  col-3" style="background:#fff">
					<div class="fui-icon-col-sm external" style="margin:0" ng-click="access_json('jy_shopwms/manage.out_log/')">
								<div>
									<div class="text bold" style="line-height:1.6rem;font-size:1rem">
														<i class="icon icon-jian" style="color:#039646;font-size: 1rem;"></i>
									</div>
								<div style="font-size:12px;">出库日志 ></div>
								</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0" ng-click="access_json('jy_shopwms/manage.in_log/')">
								<div>
									<div class="text bold" style="line-height:1.6rem;font-size:1rem">
														<i class="icon icon-jia" style="color:#039646;font-size: 1rem;"></i>
									</div>
								<div style="font-size:12px;">入库日志 ></div>
								</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0" ng-click="access_json('jy_shopwms/manage.goods/')">
								<div>
									<div class="text bold" style="line-height:1.6rem;font-size:1rem">
														<i class="icon icon-ziqu" style="color:#039646;font-size: 1rem;"></i>
									</div>
								<div style="font-size:12px;">门店商品 ></div>
								</div>
					</div>
			</div>
			<div class="fui-cell-group" style="padding:0.5rem;border-radius:0.5rem">
				<div class="fui-cell" style="padding:0">
					<div class="fui-cell-icon" style="width:auto;">
						<i class="icon icon-tianmaojishiqueren" style="font-size: 1.6rem;"></i>
					</div>
					<div class="fui-cell-text" style="font-size:0.7rem">
						<div class="bold">商品出库</div>
						<div class="subtitle" style="font-size:0.6rem">非正常销售的出库操作！</div>
					</div>
					<div class="fui-cell-remark noremark" style="font-size:0.7rem">
						<span href="javascript:" ng-click="access_json('jy_shopwms/manage.goods/')" class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">操作</span>
					</div>
				</div>		
			</div>
			<div class="fui-cell-group" style="padding:0.5rem;border-radius:0.5rem">
				<div class="fui-cell" style="padding:0">
					<div class="fui-cell-icon" style="width:auto;">
						<i class="icon icon-tianmaomendianziti" style="font-size: 1.6rem;"></i>
					</div>
					<div class="fui-cell-text" style="font-size:0.7rem">
						<div class="bold">商品入库</div>
						<div class="subtitle" style="font-size:0.6rem">线下入库操作！</div>
					</div>
					<div class="fui-cell-remark noremark" style="font-size:0.7rem">
						<span href="javascript:" ng-click="access_json('jy_shopwms/manage.goods/')" class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">操作</span>
					</div>
				</div>		
			</div>
			<div class="fui-cell-group" style="padding:0.5rem;border-radius:0.5rem">
				<div class="fui-cell" style="padding:0">
					<div class="fui-cell-icon" style="width:auto;">
						<i class="icon icon-tianmaowuyoutuihuanhuo" style="font-size: 1.6rem;"></i>
					</div>
					<div class="fui-cell-text" style="font-size:0.7rem">
						<div class="bold">商品调拨</div>
						<div class="subtitle" style="font-size:0.6rem">从A店调拨某商品到B店！</div>
					</div>
					<div class="fui-cell-remark noremark" style="font-size:0.7rem">
						<span href="javascript:" ng-click="access_json('jy_shopwms/manage.goods/')" class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">操作</span>
					</div>
				</div>		
			</div>
			<div ng-if="pagedata.is_admin==1" class="fui-cell-group" style="padding:0.5rem;border-radius:0.5rem">
				<div class="fui-cell" style="padding:0">
					<div class="fui-cell-icon" style="width:auto;">
						<i class="icon icon-tianmaoanshidaohuo" style="font-size: 1.6rem;"></i>
					</div>
					<div class="fui-cell-text" style="font-size:0.7rem">
						<div class="bold">权限设置</div>
						<div class="subtitle" style="font-size:0.6rem">给店员设置操作权限！</div>
					</div>
					<div class="fui-cell-remark noremark" style="font-size:0.7rem">
						<span href="javascript:" ng-click="access_json('jy_shopwms/manage.salergroup/')" class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">操作</span>
					</div>
				</div>		
			</div>
		</div>
    </div>
	 </div>
</div>
<div ng-if="pagedata.showstores" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.showstores=false"></i>
			<div class="fui-list-group"  id="carrierInfo" style="border-radius: 0.5rem;background:#fff;margin: 0;max-height:15rem;overflow-y:scroll">
					<a class="fui-list"  ng-repeat="item in pagedata.stores" href="javascript:;" ng-click="access_json('jy_shopwms/manage.index//storeid='+item.id)">
						<div class="fui-list-media">
							<i class="icon icon-map"></i>
						</div>
						<div class="fui-list-inner">
							<div class="bold">
								{{item.title}}
							</div>
							<div class="text address">地址：{{item.address}}</div>
						</div>
						<div class="fui-list-angle">
							<div class="angle"></div>
						</div>
					</a>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<audio id="openvoice" controls preload="auto" style="display:none;">
	<source src="../core/resource/images/neworder.mp3"></source>
</audio>
<script>
if(scope.main.menus && scope.main.menus.length>0){	
	for(var i=0;i<scope.main.menus.length;i++){
		var action=scope.main.menus[i].action
		if(action.indexOf("jy_weishop/member.cart") != -1){
			var key=i;
			scope.get('jy_weishop/member.cart/main/',function(res){
				scope.pagedata.cartnums=res.cartnums;
				scope.main.menus[key].nums=scope.pagedata.cartnums
			});
		}
	}
}
scope.pagedata.show_verify=function(){
	var url=scope.pagedata.item.url;
	scope.tool.qr(url,'show_verify_ewm',150)
}
scope.pagedata.show_payverify=function(){
	var url=scope.pagedata.item.payurl;
	scope.tool.qr(url,'show_payverify_ewm',150)
}	
scope.pagedata.openvoice=function(type){
	var voicetime = 0;
    var openvoice;
	scope.post_json('jy_merch/manage.shop/openvoice/isopenvoice='+scope.pagedata.isopenvoice,{},function(res){
	});
	if(type==1){
		 openvoice = setInterval(() => {
			if(scope.pagedata.isopenvoice!=1){
				clearInterval(openvoice);
				return false;
			}
			scope.get('jy_weishop/order.list/getnew/merchid='+scope.pagedata.item.id,function(res){
						console.log('openvoice');console.log(res);
						if(res!='none'){
							voicetime ++;
							$("#openvoice")[0].play();
						}
			});
		}, 5000);
	}
}
</script>